From 9ddcb3e07ec94a4526377d07e6f785e81d9166a0 Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Sat, 8 Sep 2001 19:33:06 +0000 Subject: [PATCH] default xscale/yscale to 0.0, not 0.5, 0.5 isn't useful 2001-09-08 Havoc Pennington * gtk/gtkalignment.c (gtk_alignment_class_init): default xscale/yscale to 0.0, not 0.5, 0.5 isn't useful * tests/testtextbuffer.c: fix usage of gtk_text_iter_spew * gtk/gtktextiter.c: fix docs (gtk_text_iter_spew): get rid of this * gtk/gtklayout.c: docs * gtk/gtkbutton.c (gtk_button_construct_child): add an alignment to center image and label together, instead of having image on left and label centered, patch/suggestion from Jacob * gtk/gtkdialog.c: docs 2001-09-08 Havoc Pennington * gtk/tmpl/gtklayout.sgml: docs * gdk-pixbuf/gdk-pixbuf.sgml: remove the section on compiling gdk-pixbuf since it isn't a standalone package anymore * gtk/building.sgml: section on compiling GTK itself --- ChangeLog | 18 ++ ChangeLog.pre-2-0 | 18 ++ ChangeLog.pre-2-10 | 18 ++ ChangeLog.pre-2-2 | 18 ++ ChangeLog.pre-2-4 | 18 ++ ChangeLog.pre-2-6 | 18 ++ ChangeLog.pre-2-8 | 18 ++ docs/reference/ChangeLog | 9 + docs/reference/gdk-pixbuf/Makefile.am | 1 - docs/reference/gdk-pixbuf/gdk-pixbuf.sgml | 2 - docs/reference/gtk/Makefile.am | 2 + .../compiling.sgml => gtk/building.sgml} | 91 +++++-- docs/reference/gtk/gtk-docs.sgml | 2 + docs/reference/gtk/gtk-sections.txt | 1 - docs/reference/gtk/tmpl/gtk-unused.sgml | 15 +- docs/reference/gtk/tmpl/gtkhscrollbar.sgml | 12 +- docs/reference/gtk/tmpl/gtklayout.sgml | 32 ++- docs/reference/gtk/tmpl/gtknotebook.sgml | 9 + docs/reference/gtk/tmpl/gtkrc.sgml | 1 - docs/reference/gtk/tmpl/gtkscrollbar.sgml | 21 ++ .../reference/gtk/tmpl/gtkscrolledwindow.sgml | 227 ++++++++++-------- docs/reference/gtk/tmpl/gtktextiter.sgml | 9 - gtk/gtkalignment.c | 16 +- gtk/gtkbutton.c | 13 +- gtk/gtkdialog.c | 17 ++ gtk/gtklayout.c | 100 +++++++- gtk/gtklayout.h | 8 +- gtk/gtktextiter.c | 88 +++++-- gtk/gtktextiter.h | 4 - tests/testtextbuffer.c | 11 + 30 files changed, 611 insertions(+), 206 deletions(-) rename docs/reference/{gdk-pixbuf/compiling.sgml => gtk/building.sgml} (57%) diff --git a/ChangeLog b/ChangeLog index bb7d80a9f9..ca57f0825f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,21 @@ +2001-09-08 Havoc Pennington + + * gtk/gtkalignment.c (gtk_alignment_class_init): default + xscale/yscale to 0.0, not 0.5, 0.5 isn't useful + + * tests/testtextbuffer.c: fix usage of gtk_text_iter_spew + + * gtk/gtktextiter.c: fix docs + (gtk_text_iter_spew): get rid of this + + * gtk/gtklayout.c: docs + + * gtk/gtkbutton.c (gtk_button_construct_child): add an alignment + to center image and label together, instead of having image on + left and label centered, patch/suggestion from Jacob + + * gtk/gtkdialog.c: docs + Sat Sep 8 14:19:49 2001 Jonathan Blandford * gtk/gtkliststore.c: Write documentation diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index bb7d80a9f9..ca57f0825f 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,21 @@ +2001-09-08 Havoc Pennington + + * gtk/gtkalignment.c (gtk_alignment_class_init): default + xscale/yscale to 0.0, not 0.5, 0.5 isn't useful + + * tests/testtextbuffer.c: fix usage of gtk_text_iter_spew + + * gtk/gtktextiter.c: fix docs + (gtk_text_iter_spew): get rid of this + + * gtk/gtklayout.c: docs + + * gtk/gtkbutton.c (gtk_button_construct_child): add an alignment + to center image and label together, instead of having image on + left and label centered, patch/suggestion from Jacob + + * gtk/gtkdialog.c: docs + Sat Sep 8 14:19:49 2001 Jonathan Blandford * gtk/gtkliststore.c: Write documentation diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index bb7d80a9f9..ca57f0825f 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,21 @@ +2001-09-08 Havoc Pennington + + * gtk/gtkalignment.c (gtk_alignment_class_init): default + xscale/yscale to 0.0, not 0.5, 0.5 isn't useful + + * tests/testtextbuffer.c: fix usage of gtk_text_iter_spew + + * gtk/gtktextiter.c: fix docs + (gtk_text_iter_spew): get rid of this + + * gtk/gtklayout.c: docs + + * gtk/gtkbutton.c (gtk_button_construct_child): add an alignment + to center image and label together, instead of having image on + left and label centered, patch/suggestion from Jacob + + * gtk/gtkdialog.c: docs + Sat Sep 8 14:19:49 2001 Jonathan Blandford * gtk/gtkliststore.c: Write documentation diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index bb7d80a9f9..ca57f0825f 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,21 @@ +2001-09-08 Havoc Pennington + + * gtk/gtkalignment.c (gtk_alignment_class_init): default + xscale/yscale to 0.0, not 0.5, 0.5 isn't useful + + * tests/testtextbuffer.c: fix usage of gtk_text_iter_spew + + * gtk/gtktextiter.c: fix docs + (gtk_text_iter_spew): get rid of this + + * gtk/gtklayout.c: docs + + * gtk/gtkbutton.c (gtk_button_construct_child): add an alignment + to center image and label together, instead of having image on + left and label centered, patch/suggestion from Jacob + + * gtk/gtkdialog.c: docs + Sat Sep 8 14:19:49 2001 Jonathan Blandford * gtk/gtkliststore.c: Write documentation diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index bb7d80a9f9..ca57f0825f 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,21 @@ +2001-09-08 Havoc Pennington + + * gtk/gtkalignment.c (gtk_alignment_class_init): default + xscale/yscale to 0.0, not 0.5, 0.5 isn't useful + + * tests/testtextbuffer.c: fix usage of gtk_text_iter_spew + + * gtk/gtktextiter.c: fix docs + (gtk_text_iter_spew): get rid of this + + * gtk/gtklayout.c: docs + + * gtk/gtkbutton.c (gtk_button_construct_child): add an alignment + to center image and label together, instead of having image on + left and label centered, patch/suggestion from Jacob + + * gtk/gtkdialog.c: docs + Sat Sep 8 14:19:49 2001 Jonathan Blandford * gtk/gtkliststore.c: Write documentation diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index bb7d80a9f9..ca57f0825f 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,21 @@ +2001-09-08 Havoc Pennington + + * gtk/gtkalignment.c (gtk_alignment_class_init): default + xscale/yscale to 0.0, not 0.5, 0.5 isn't useful + + * tests/testtextbuffer.c: fix usage of gtk_text_iter_spew + + * gtk/gtktextiter.c: fix docs + (gtk_text_iter_spew): get rid of this + + * gtk/gtklayout.c: docs + + * gtk/gtkbutton.c (gtk_button_construct_child): add an alignment + to center image and label together, instead of having image on + left and label centered, patch/suggestion from Jacob + + * gtk/gtkdialog.c: docs + Sat Sep 8 14:19:49 2001 Jonathan Blandford * gtk/gtkliststore.c: Write documentation diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index bb7d80a9f9..ca57f0825f 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,21 @@ +2001-09-08 Havoc Pennington + + * gtk/gtkalignment.c (gtk_alignment_class_init): default + xscale/yscale to 0.0, not 0.5, 0.5 isn't useful + + * tests/testtextbuffer.c: fix usage of gtk_text_iter_spew + + * gtk/gtktextiter.c: fix docs + (gtk_text_iter_spew): get rid of this + + * gtk/gtklayout.c: docs + + * gtk/gtkbutton.c (gtk_button_construct_child): add an alignment + to center image and label together, instead of having image on + left and label centered, patch/suggestion from Jacob + + * gtk/gtkdialog.c: docs + Sat Sep 8 14:19:49 2001 Jonathan Blandford * gtk/gtkliststore.c: Write documentation diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog index 8b0a181fde..aebf62c588 100644 --- a/docs/reference/ChangeLog +++ b/docs/reference/ChangeLog @@ -1,3 +1,12 @@ +2001-09-08 Havoc Pennington + + * gtk/tmpl/gtklayout.sgml: docs + + * gdk-pixbuf/gdk-pixbuf.sgml: remove the section on compiling + gdk-pixbuf since it isn't a standalone package anymore + + * gtk/building.sgml: section on compiling GTK itself + 2001-09-08 Havoc Pennington * gtk/gtk-sections.txt: put GtkPacker back in here so it won't be diff --git a/docs/reference/gdk-pixbuf/Makefile.am b/docs/reference/gdk-pixbuf/Makefile.am index 39dd8e4858..ba9968cb05 100644 --- a/docs/reference/gdk-pixbuf/Makefile.am +++ b/docs/reference/gdk-pixbuf/Makefile.am @@ -38,7 +38,6 @@ HTML_IMAGES = # Extra SGML files that are included by DOC_MAIN_SGML_FILE content_files = \ - compiling.sgml \ gdk-pixbuf.sgml \ porting-from-imlib.sgml diff --git a/docs/reference/gdk-pixbuf/gdk-pixbuf.sgml b/docs/reference/gdk-pixbuf/gdk-pixbuf.sgml index 60907f1350..0e10279d54 100644 --- a/docs/reference/gdk-pixbuf/gdk-pixbuf.sgml +++ b/docs/reference/gdk-pixbuf/gdk-pixbuf.sgml @@ -14,7 +14,6 @@ - gdk-pixbuf"> Imlib"> @@ -101,7 +100,6 @@ &Porting-From-Imlib; - &Compiling; diff --git a/docs/reference/gtk/Makefile.am b/docs/reference/gtk/Makefile.am index 8d8c7295e3..35ce033b1d 100644 --- a/docs/reference/gtk/Makefile.am +++ b/docs/reference/gtk/Makefile.am @@ -52,9 +52,11 @@ HTML_IMAGES = # Extra SGML files that are included by $(DOC_MAIN_SGML_FILE) content_files = \ + building.sgml \ compiling.sgml \ framebuffer.sgml \ objects_grouped.sgml \ + resources.sgml \ text_widget.sgml \ tree_widget.sgml diff --git a/docs/reference/gdk-pixbuf/compiling.sgml b/docs/reference/gtk/building.sgml similarity index 57% rename from docs/reference/gdk-pixbuf/compiling.sgml rename to docs/reference/gtk/building.sgml index 6224909f8c..9b6541ec04 100644 --- a/docs/reference/gdk-pixbuf/compiling.sgml +++ b/docs/reference/gtk/building.sgml @@ -1,22 +1,28 @@ - - Compiling the &gdk-pixbuf; library + + +Compiling the GTK+ package +3 +GTK Library + - - This appendix describes the special options you can use while - compiling the &gdk-pixbuf; library. - + +Compiling the GTK+ Package + +How to compile GTK+ itself + + - - Building the Library + + Building the Library on UNIX - The &gdk-pixbuf; library uses the standard GNU build system, + On UNIX, GTK+ uses the standard GNU build system, using autoconf for package configuration and resolving portability issues, automake for building makefiles that comply with the GNU Coding Standards, and libtool for building shared libraries on multiple platforms. The normal sequence for - compiling and installing the &gdk-pixbuf; library is thus: + compiling and installing the GTK+ library is thus: ./configure @@ -33,14 +39,14 @@ ./configure --help for information about the standard options. - + - + Extra Configuration Options In addition to the normal options, the - configure script in the &gdk-pixbuf; + configure script in the GTK+ library supports these additional arguments: @@ -50,11 +56,20 @@ --disable-modules --enable-modules - + + --with-included-loaders==LOADER1,LOADER2,... + --disable-gtk-doc --enable-gtk-doc + + --with-gdktarget=[x11|linux-fb] + + + --disable-shadowfb + --enable-shadowfb + @@ -63,11 +78,11 @@ --enable-modules - Normally &gdk-pixbuf; will try to build the image file + Normally GTK+ will try to build the GdkPixbuf image file format loaders as little shared libraries that are loaded on demand. The --disable-modules argument indicates that they should all be built statically - into the &gdk-pixbuf; library instead. This is useful for + into the GTK+ library instead. This is useful for people who need to produce statically-linked binaries. If neither --disable-modules nor --enable-modules is specified, then @@ -76,6 +91,16 @@ + + <systemitem>--with-included-loaders</systemitem> + + + This option allows you to specify which image loaders you + want to include; for example, you might include only the PNG + loader to create a smaller GdkPixbuf binary. + + + <systemitem>--disable-gtk-doc</systemitem> and <systemitem>--enable-gtk-doc</systemitem> @@ -85,19 +110,33 @@ to auto-detect whether the gtk-doc package is installed. If it is, then it will use it to extract and build the - documentation for the &gdk-pixbuf; library. These options + documentation for the GTK+ library. These options can be used to explicitly control whether gtk-doc should be used or not. If it is not used, the distributed, pre-generated HTML files will be installed instead of building them on your machine. - - - - + + + <systemitem>--with-gdktarget</systemitem> + + + Toggles between the x11 and linux-fb backends for GDK. + The default is x11. + + + + + <systemitem>--disable-shadowfb</systemitem> and + <systemitem>--enable-shadowfb</systemitem> + + + Toggles shadow framebuffer support for the linux-fb target, + if selected. + + + + + + diff --git a/docs/reference/gtk/gtk-docs.sgml b/docs/reference/gtk/gtk-docs.sgml index 70bfd51ed4..27b72e85e7 100644 --- a/docs/reference/gtk/gtk-docs.sgml +++ b/docs/reference/gtk/gtk-docs.sgml @@ -139,6 +139,7 @@ + @@ -229,6 +230,7 @@ that is, GUI components such as #GtkButton or #GtkTextView. + >k-Building; >k-Compiling; >k-Resources; >k-Windows; diff --git a/docs/reference/gtk/gtk-sections.txt b/docs/reference/gtk/gtk-sections.txt index fbe690514f..189523bd84 100644 --- a/docs/reference/gtk/gtk-sections.txt +++ b/docs/reference/gtk/gtk-sections.txt @@ -2288,7 +2288,6 @@ gtk_text_iter_equal gtk_text_iter_compare gtk_text_iter_in_range gtk_text_iter_order -gtk_text_iter_spew
diff --git a/docs/reference/gtk/tmpl/gtk-unused.sgml b/docs/reference/gtk/tmpl/gtk-unused.sgml index 658a0dc6a7..a8b46d0fe9 100644 --- a/docs/reference/gtk/tmpl/gtk-unused.sgml +++ b/docs/reference/gtk/tmpl/gtk-unused.sgml @@ -1705,13 +1705,6 @@ arrow. @show_toggle_indicator: unused @show_submenu_indicator: whether to show the arrow or not - - - - -@notebook: -@page_num: - Private function to get an argument and argument info from an object. @@ -2160,6 +2153,14 @@ Creates a border around the arrows of a #GtkSpinButton. The type of border is de @first: @second: + + + + + +@iter: +@desc: + diff --git a/docs/reference/gtk/tmpl/gtkhscrollbar.sgml b/docs/reference/gtk/tmpl/gtkhscrollbar.sgml index e29afd25fd..f03991fbb4 100644 --- a/docs/reference/gtk/tmpl/gtkhscrollbar.sgml +++ b/docs/reference/gtk/tmpl/gtkhscrollbar.sgml @@ -5,16 +5,18 @@ GtkHScrollbar A horizontal scrollbar + -The HScrollbar widget is a widget arranged horizontally creating a scroll -bar. See #GtkScrollbar for details on scrollbars. #GtkAdjustment pointers may be -added to handle the adjustment of the scrollbars or it may be left NULL in which -case one will be created you. See #GtkAdjustment for details. +The HScrollbar widget is a widget arranged horizontally creating a +scroll bar. See #GtkScrollbar for details on +scrollbars. #GtkAdjustment pointers may be added to handle the +adjustment of the scrollbars or it may be left NULL in which case one +will be created you. See #GtkAdjustment for details. - +#GtkScrollbar, #GtkScrolledWindow diff --git a/docs/reference/gtk/tmpl/gtklayout.sgml b/docs/reference/gtk/tmpl/gtklayout.sgml index faf95a164a..632dc43d17 100644 --- a/docs/reference/gtk/tmpl/gtklayout.sgml +++ b/docs/reference/gtk/tmpl/gtklayout.sgml @@ -3,15 +3,28 @@ GtkLayout +Infinite scrollable area containing child widgets and/or custom drawing +#GtkLayout is similar to #GtkDrawingArea in that it's a "blank slate" +and doesn't do anything but paint a blank background by default. It's +different in that it supports scrolling natively (you can add it to a +#GtkScrolledWindow), and it can contain child widgets, since it's a +#GtkContainer. However if you're just going to draw, a #GtkDrawingArea +is a better choice since it has lower overhead. + + +When handling expose events on a #GtkLayout, you must draw to +GTK_LAYOUT (layout)->bin_window, rather than to +GTK_WIDGET (layout)->window, as you would for a drawing +area. - +#GtkDrawingArea, #GtkScrolledWindow @@ -19,6 +32,7 @@ GtkLayout +@bin_window: @@ -36,9 +50,11 @@ GtkLayout @layout: -@widget: +@child_widget: @x: @y: + +@widget: @@ -47,9 +63,11 @@ GtkLayout @layout: -@widget: +@child_widget: @x: @y: + +@widget: @@ -135,21 +153,21 @@ GtkLayout - +Horizontal scroll adjustment, see gtk_layout_set_hadjustment() - +Vertical scroll adjustment, see gtk_layout_set_vadjustment() - +Layout width, see gtk_layout_set_size() - +Layout height, see gtk_layout_set_size() diff --git a/docs/reference/gtk/tmpl/gtknotebook.sgml b/docs/reference/gtk/tmpl/gtknotebook.sgml index 6f9e96d0c8..04ce877083 100644 --- a/docs/reference/gtk/tmpl/gtknotebook.sgml +++ b/docs/reference/gtk/tmpl/gtknotebook.sgml @@ -132,6 +132,15 @@ Deprecated compatibility macro. @Returns: + + + + + +@notebook: +@page_num: + + diff --git a/docs/reference/gtk/tmpl/gtkrc.sgml b/docs/reference/gtk/tmpl/gtkrc.sgml index cc0b23b6d2..30ffca8235 100644 --- a/docs/reference/gtk/tmpl/gtkrc.sgml +++ b/docs/reference/gtk/tmpl/gtkrc.sgml @@ -495,7 +495,6 @@ This can later be composited together with other #GtkRcStyle structures to form a #GtkStyle. -@parent_instance: @name: @bg_pixmap_name: @font_desc: diff --git a/docs/reference/gtk/tmpl/gtkscrollbar.sgml b/docs/reference/gtk/tmpl/gtkscrollbar.sgml index 3c3834826c..befa256ea8 100644 --- a/docs/reference/gtk/tmpl/gtkscrollbar.sgml +++ b/docs/reference/gtk/tmpl/gtkscrollbar.sgml @@ -10,6 +10,17 @@ The #GtkScrollbar widget is an abstract base class for #GtkHScrollbar and #GtkVScrollbar. It is not very useful in itself. + +The position of the thumb in a scrollbar is controlled by the scroll +adjustments. See #GtkAdjustment for the fields in an adjustment - for +#GtkScrollbar, the "value" field represents the position of the +scrollbar, which must be between the "lower" field and "upper - +page_size." The "page_size" field represents the size of the visible +scrollable area. The "step_increment" and "page_increment" fields are +used when the user asks to step down (using the small stepper arrows) +or page down (using for example the PageDown key). + + @@ -24,6 +35,16 @@ The #GtkScrollbar widget is an abstract base class for #GtkHScrollbar and a vertical scrollbar. + +#GtkAdjustment +connects scrollbars to the widget being scrolled. + + + +#GtkScrolledWindow +convenient widget for setting up scrolling. + + diff --git a/docs/reference/gtk/tmpl/gtkscrolledwindow.sgml b/docs/reference/gtk/tmpl/gtkscrolledwindow.sgml index 3059e981cf..85bd8a5e11 100644 --- a/docs/reference/gtk/tmpl/gtkscrolledwindow.sgml +++ b/docs/reference/gtk/tmpl/gtkscrolledwindow.sgml @@ -2,61 +2,86 @@ GtkScrolledWindow - + Adds scrollbars to its child widget. - -#GtkScrolledWindow is a #GtkBin subclass: it's a container -the accepts a single child widget. #GtkScrolledWindow adds scrollbars -to the child widget. - - - -The scrolled window can work in two ways. Some widgets have native -scrolling support; these widgets have "slots" for #GtkAdjustment -objects. The scrolled window installs #GtkAdjustment objects in the -child window's slots using the set_scroll_adjustments_signal, found in -#GtkWidgetClass. (Conceptually, these widgets implement a "Scrollable" -interface; because GTK+ 1.2 lacks multiple inheritance, this interface -is hackily implemented as a signal in #GtkWidgetClass.) - - - -The second way to use the scrolled window is useful with widgets that -lack the set_scroll_adjustments_signal. The #GtkViewport widget acts as -a proxy, implementing scrollability for child widgets that lack their -own scrolling capabilities. - - - -If a widget has native scrolling abilities, it can be added to the -#GtkScrolledWindow with gtk_container_add(). If a widget does not, you -must first add the widget to a #GtkViewport, then add the GtkViewport -to the scrolled window. The convenience function -gtk_scrolled_window_add_with_viewport() does exactly this, so you can -ignore the presence of the viewport. + +#GtkScrolledWindow is a #GtkBin subclass: it's a container +the accepts a single child widget. #GtkScrolledWindow adds scrollbars +to the child widget and optionally draws a beveled frame around the +child widget. + + + +The scrolled window can work in two ways. Some widgets have native +scrolling support; these widgets have "slots" for #GtkAdjustment +objects. +The scrolled window installs #GtkAdjustment objects in +the child window's slots using the set_scroll_adjustments_signal, +found in #GtkWidgetClass. (Conceptually, these widgets implement a +"Scrollable" interface; because GTK+ 1.2 lacked interface support in +the object system, this interface is hackily implemented as a signal +in #GtkWidgetClass. The GTK+ 2.0 object system would allow a clean +implementation, but it wasn't worth breaking the +API.) +Widgets with native scroll support include #GtkTreeView, #GtkTextView, +and #GtkLayout. + + + +For widgets that lack native scrolling support, the #GtkViewport +widget acts as an adaptor class, implementing scrollability for child +widgets that lack their own scrolling capabilities. Use #GtkViewport +to scroll child widgets such as #GtkTable, #GtkBox, and so on. + + + +If a widget has native scrolling abilities, it can be added to the +#GtkScrolledWindow with gtk_container_add(). If a widget does not, you +must first add the widget to a #GtkViewport, then add the #GtkViewport +to the scrolled window. The convenience function +gtk_scrolled_window_add_with_viewport() does exactly this, so you can +ignore the presence of the viewport. + + + +The position of the scrollbars is controlled by the scroll +adjustments. See #GtkAdjustment for the fields in an adjustment - for +#GtkScrollbar, used by #GtkScrolledWindow, the "value" field +represents the position of the scrollbar, which must be between the +"lower" field and "upper - page_size." The "page_size" field +represents the size of the visible scrollable area. The +"step_increment" and "page_increment" fields are used when the user +asks to step down (using the small stepper arrows) or page down (using +for example the PageDown key). + + + +If a #GtkScrolledWindow doesn't behave quite as you would like, or +doesn't have exactly the right layout, it's very possible to set up +your own scrolling with #GtkScrollbar and for example a #GtkTable. - -#GtkViewport, #GtkAdjustment, #GtkWidgetClass + +#GtkViewport, #GtkAdjustment, #GtkWidgetClass - -There are no public fields in the #GtkScrolledWindow struct; it should -only be accessed using the functions below. + +There are no public fields in the #GtkScrolledWindow struct; it should +only be accessed using the functions below. - -Creates a new scrolled window. The two arguments are the scrolled -window's adjustments; these will be shared with the scrollbars and the -child widget to keep the bars in sync with the child. Usually you want -to pass NULL for the adjustments, which will cause the scrolled window -to create them for you. + +Creates a new scrolled window. The two arguments are the scrolled +window's adjustments; these will be shared with the scrollbars and the +child widget to keep the bars in sync with the child. Usually you want +to pass NULL for the adjustments, which will cause the scrolled window +to create them for you. @hadjustment: Horizontal adjustment. @@ -65,10 +90,10 @@ to create them for you. - -Returns the horizontal scrollbar's adjustment, used to connect the -horizontal scrollbar to the child widget's horizontal scroll -functionality. + +Returns the horizontal scrollbar's adjustment, used to connect the +horizontal scrollbar to the child widget's horizontal scroll +functionality. @scrolled_window: A #GtkScrolledWindow. @@ -76,10 +101,10 @@ functionality. - -Returns the vertical scrollbar's adjustment, used to connect the -vertical scrollbar to the child widget's vertical scroll -functionality. + +Returns the vertical scrollbar's adjustment, used to connect the +vertical scrollbar to the child widget's vertical scroll +functionality. @scrolled_window: A #GtkScrolledWindow. @@ -87,14 +112,14 @@ functionality. - -Sets the scrollbar policy for the horizontal and vertical scrollbars. -The policy determines when the scrollbar should appear; it is a value -from the #GtkPolicyType enumeration. If %GTK_POLICY_ALWAYS, the -scrollbar is always present; if %GTK_POLICY_NEVER, the scrollbar is -never present; if %GTK_POLICY_AUTOMATIC, the scrollbar is present only -if needed (that is, if the slider part of the bar would be smaller -than the trough - the display is larger than the page size). + +Sets the scrollbar policy for the horizontal and vertical scrollbars. +The policy determines when the scrollbar should appear; it is a value +from the #GtkPolicyType enumeration. If %GTK_POLICY_ALWAYS, the +scrollbar is always present; if %GTK_POLICY_NEVER, the scrollbar is +never present; if %GTK_POLICY_AUTOMATIC, the scrollbar is present only +if needed (that is, if the slider part of the bar would be smaller +than the trough - the display is larger than the page size). @scrolled_window: A #GtkScrolledWindow. @@ -103,27 +128,27 @@ than the trough - the display is larger than the page size). - -Used to add children without native scrolling capabilities. This is -simply a convenience function; it is equivalent to adding the -unscrollable child to a viewport, then adding the viewport to the -scrolled window. If a child has native scrolling, use -gtk_container_add() instead of this function. - - - -The viewport scrolls the child by moving its #GdkWindow, and takes the -size of the child to be the size of its toplevel #GdkWindow. This will -be very wrong for most widgets that support native scrolling; for -example, if you add a #GtkCList with a viewport, the whole widget will -scroll, including the column headings. Thus #GtkCList supports -scrolling already, and should not be used with the #GtkViewport proxy. - - - -A widget supports scrolling natively if the -set_scroll_adjustments_signal field in #GtkWidgetClass is non-zero, -i.e. has been filled in with a valid signal identifier. + +Used to add children without native scrolling capabilities. This is +simply a convenience function; it is equivalent to adding the +unscrollable child to a viewport, then adding the viewport to the +scrolled window. If a child has native scrolling, use +gtk_container_add() instead of this function. + + + +The viewport scrolls the child by moving its #GdkWindow, and takes the +size of the child to be the size of its toplevel #GdkWindow. This will +be very wrong for most widgets that support native scrolling; for +example, if you add a #GtkCList with a viewport, the whole widget will +scroll, including the column headings. Thus #GtkCList supports +scrolling already, and should not be used with the #GtkViewport proxy. + + + +A widget supports scrolling natively if the +set_scroll_adjustments_signal field in #GtkWidgetClass is non-zero, +i.e. has been filled in with a valid signal identifier. @scrolled_window: A #GtkScrolledWindow. @@ -131,12 +156,12 @@ i.e. has been filled in with a valid signal identifier. - -Determines the location of the child widget with respect to the -scrollbars. The default is %GTK_CORNER_TOP_LEFT, meaning the child is -in the top left, with the scrollbars underneath and to the right. -Other values in #GtkCornerType are %GTK_CORNER_TOP_RIGHT, -%GTK_CORNER_BOTTOM_LEFT, and %GTK_CORNER_BOTTOM_RIGHT. + +Determines the location of the child widget with respect to the +scrollbars. The default is %GTK_CORNER_TOP_LEFT, meaning the child is +in the top left, with the scrollbars underneath and to the right. +Other values in #GtkCornerType are %GTK_CORNER_TOP_RIGHT, +%GTK_CORNER_BOTTOM_LEFT, and %GTK_CORNER_BOTTOM_RIGHT. @scrolled_window: A #GtkScrolledWindow. @@ -153,8 +178,8 @@ Other values in #GtkCornerType are %GTK_CORNER_TOP_RIGHT, - -Sets the #GtkAdjustment for the horizontal scrollbar. + +Sets the #GtkAdjustment for the horizontal scrollbar. @scrolled_window: A #GtkScrolledWindow. @@ -162,8 +187,8 @@ Sets the #GtkAdjustment for the horizontal scrollbar. - -Sets the #GtkAdjustment for the vertical scrollbar. + +Sets the #GtkAdjustment for the vertical scrollbar. @scrolled_window: A #GtkScrolledWindow. @@ -203,33 +228,33 @@ Sets the #GtkAdjustment for the vertical scrollbar. - -Horizontal adjustment. See gtk_scrolled_window_set_hadjustment(), gtk_scrolled_window_get_hadjustment(). + +Horizontal adjustment. See gtk_scrolled_window_set_hadjustment(), gtk_scrolled_window_get_hadjustment(). - -Vertical adjustment. See gtk_scrolled_window_set_vadjustment(), gtk_scrolled_window_get_vadjustment(). + +Vertical adjustment. See gtk_scrolled_window_set_vadjustment(), gtk_scrolled_window_get_vadjustment(). - -Horizontal scrollbar policy (show scrollbar always, never, or "when appropriate"). + +Horizontal scrollbar policy (show scrollbar always, never, or "when appropriate"). - -Vertical scrollbar policy (show scrollbar always, never, or "when appropriate"). + +Vertical scrollbar policy (show scrollbar always, never, or "when appropriate"). - -Position of child window with respect to scrollbars; top left, top -right, bottom left, bottom right. + +Position of child window with respect to scrollbars; top left, top +right, bottom left, bottom right. - +Type of frame drawn around the child of the scrolled window. diff --git a/docs/reference/gtk/tmpl/gtktextiter.sgml b/docs/reference/gtk/tmpl/gtktextiter.sgml index 29f7111025..7e565e46d0 100644 --- a/docs/reference/gtk/tmpl/gtktextiter.sgml +++ b/docs/reference/gtk/tmpl/gtktextiter.sgml @@ -790,12 +790,3 @@ types related to the text widget and how they work together. @second: - - - - - -@iter: -@desc: - - diff --git a/gtk/gtkalignment.c b/gtk/gtkalignment.c index df78a4310e..f4eaa1c08a 100644 --- a/gtk/gtkalignment.c +++ b/gtk/gtkalignment.c @@ -122,7 +122,7 @@ gtk_alignment_class_init (GtkAlignmentClass *class) _("Value between 0.0 and 1.0 to indicate X scale"), 0.0, 1.0, - 0.5, + 0.0, G_PARAM_READABLE | G_PARAM_WRITABLE)); g_object_class_install_property (gobject_class, PROP_YSCALE, @@ -131,7 +131,7 @@ gtk_alignment_class_init (GtkAlignmentClass *class) _("Value between 0.0 and 1.0 to indicate Y scale"), 0.0, 1.0, - 0.5, + 0.0, G_PARAM_READABLE | G_PARAM_WRITABLE)); } @@ -142,8 +142,8 @@ gtk_alignment_init (GtkAlignment *alignment) alignment->xalign = 0.5; alignment->yalign = 0.5; - alignment->xscale = 1.0; - alignment->yscale = 1.0; + alignment->xscale = 0.0; + alignment->yscale = 0.0; } GtkWidget* @@ -178,7 +178,7 @@ gtk_alignment_set_property (GObject *object, { case PROP_XALIGN: gtk_alignment_set (alignment, - g_value_get_float(value), + g_value_get_float (value), alignment->yalign, alignment->xscale, alignment->yscale); @@ -186,7 +186,7 @@ gtk_alignment_set_property (GObject *object, case PROP_YALIGN: gtk_alignment_set (alignment, alignment->xalign, - g_value_get_float(value), + g_value_get_float (value), alignment->xscale, alignment->yscale); break; @@ -194,7 +194,7 @@ gtk_alignment_set_property (GObject *object, gtk_alignment_set (alignment, alignment->xalign, alignment->yalign, - g_value_get_float(value), + g_value_get_float (value), alignment->yscale); break; case PROP_YSCALE: @@ -202,7 +202,7 @@ gtk_alignment_set_property (GObject *object, alignment->xalign, alignment->yalign, alignment->xscale, - g_value_get_float(value)); + g_value_get_float (value)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c index 61cafd9967..5d4a27a7b6 100644 --- a/gtk/gtkbutton.c +++ b/gtk/gtkbutton.c @@ -25,6 +25,7 @@ */ #include +#include "gtkalignment.h" #include "gtkbutton.h" #include "gtklabel.h" #include "gtkmain.h" @@ -405,6 +406,7 @@ gtk_button_construct_child (GtkButton *button) GtkWidget *label; GtkWidget *image; GtkWidget *hbox; + GtkWidget *align; if (!button->constructed) return; @@ -425,13 +427,16 @@ gtk_button_construct_child (GtkButton *button) gtk_label_set_mnemonic_widget (GTK_LABEL (label), GTK_WIDGET (button)); image = gtk_image_new_from_stock (button->label_text, GTK_ICON_SIZE_BUTTON); - hbox = gtk_hbox_new (FALSE, 1); + hbox = gtk_hbox_new (FALSE, 2); + align = gtk_alignment_new (0.5, 0.5, 0.0, 0.0); + gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0); - gtk_box_pack_end (GTK_BOX (hbox), label, TRUE, TRUE, 0); + gtk_box_pack_end (GTK_BOX (hbox), label, FALSE, FALSE, 0); - gtk_container_add (GTK_CONTAINER (button), hbox); - gtk_widget_show_all (hbox); + gtk_container_add (GTK_CONTAINER (button), align); + gtk_container_add (GTK_CONTAINER (align), hbox); + gtk_widget_show_all (align); return; } diff --git a/gtk/gtkdialog.c b/gtk/gtkdialog.c index 15398ce199..c758db0943 100644 --- a/gtk/gtkdialog.c +++ b/gtk/gtkdialog.c @@ -689,6 +689,15 @@ gtk_dialog_set_default_response (GtkDialog *dialog, g_list_free (children); } +/** + * gtk_dialog_set_has_separator: + * @dialog: a #GtkDialog + * @setting: %TRUE to have a separator + * + * Sets whether the dialog has a separator above the buttons. + * %TRUE by default. + * + **/ void gtk_dialog_set_has_separator (GtkDialog *dialog, gboolean setting) @@ -718,6 +727,14 @@ gtk_dialog_set_has_separator (GtkDialog *dialog, g_object_notify (G_OBJECT (dialog), "has_separator"); } +/** + * gtk_dialog_get_has_separator: + * @dialog: a #GtkDialog + * + * Accessor for whether the dialog has a separator. + * + * Return value: %TRUE if the dialog has a separator + **/ gboolean gtk_dialog_get_has_separator (GtkDialog *dialog) { diff --git a/gtk/gtklayout.c b/gtk/gtklayout.c index 607137f882..c28f4a59e1 100644 --- a/gtk/gtklayout.c +++ b/gtk/gtklayout.c @@ -106,6 +106,17 @@ static GtkWidgetClass *parent_class = NULL; /* Public interface */ +/** + * gtk_layout_new: + * @hadjustment: horizontal scroll adjustment, or %NULL + * @vadjustment: vertical scroll adjustment, or %NULL + * + * Creates a new #GtkLayout. Unless you have a specific adjustment + * you'd like the layout to use for scrolling, pass %NULL for + * @hadjustment and @vadjustment. + * + * Return value: a new #GtkLayout + **/ GtkWidget* gtk_layout_new (GtkAdjustment *hadjustment, @@ -120,6 +131,19 @@ gtk_layout_new (GtkAdjustment *hadjustment, return GTK_WIDGET (layout); } +/** + * gtk_layout_get_hadjustment: + * @layout: a #GtkLayout + * + * This function should only be called after the layout has been + * placed in a #GtkScrolledWindow or otherwise configured for + * scrolling. It returns the #GtkAdjustment used for communication + * between the horizontal scrollbar and @layout. + * + * See #GtkScrolledWindow, #GtkScrollbar, #GtkAdjustment for details. + * + * Return value: horizontal scroll adjustment + **/ GtkAdjustment* gtk_layout_get_hadjustment (GtkLayout *layout) { @@ -127,6 +151,19 @@ gtk_layout_get_hadjustment (GtkLayout *layout) return layout->hadjustment; } +/** + * gtk_layout_get_vadjustment: + * @layout: a #GtkLayout + * + * This function should only be called after the layout has been + * placed in a #GtkScrolledWindow or otherwise configured for + * scrolling. It returns the #GtkAdjustment used for communication + * between the vertical scrollbar and @layout. + * + * See #GtkScrolledWindow, #GtkScrollbar, #GtkAdjustment for details. + * + * Return value: vertical scroll adjustment + **/ GtkAdjustment* gtk_layout_get_vadjustment (GtkLayout *layout) { @@ -204,6 +241,16 @@ gtk_layout_finalize (GObject *object) G_OBJECT_CLASS (parent_class)->finalize (object); } +/** + * gtk_layout_set_hadjustment: + * @layout: a #GtkLayout + * @adjustment: new scroll adjustment + * + * Sets the horizontal scroll adjustment for the layout. + * + * See #GtkScrolledWindow, #GtkScrollbar, #GtkAdjustment for details. + * + **/ void gtk_layout_set_hadjustment (GtkLayout *layout, GtkAdjustment *adjustment) @@ -214,7 +261,16 @@ gtk_layout_set_hadjustment (GtkLayout *layout, g_object_notify (G_OBJECT (layout), "hadjustment"); } - +/** + * gtk_layout_set_vadjustment: + * @layout: a #GtkLayout + * @adjustment: new scroll adjustment + * + * Sets the vertical scroll adjustment for the layout. + * + * See #GtkScrolledWindow, #GtkScrollbar, #GtkAdjustment for details. + * + **/ void gtk_layout_set_vadjustment (GtkLayout *layout, GtkAdjustment *adjustment) @@ -246,6 +302,17 @@ get_child (GtkLayout *layout, return NULL; } +/** + * gtk_layout_put: + * @layout: a #GtkLayout + * @child_widget: child widget + * @x: X position of child widget + * @y: Y position of child widget + * + * Adds @child_widget to @layout, at position (@x,@y). + * @layout becomes the new parent container of @child_widget. + * + **/ void gtk_layout_put (GtkLayout *layout, GtkWidget *child_widget, @@ -309,6 +376,16 @@ gtk_layout_move_internal (GtkLayout *layout, gtk_widget_queue_resize (GTK_WIDGET (layout)); } +/** + * gtk_layout_move: + * @layout: a #GtkLayout + * @child_widget: a current child of @layout + * @x: X position to move to + * @y: Y position to move to + * + * Moves a current child of @layout to a new position. + * + **/ void gtk_layout_move (GtkLayout *layout, GtkWidget *child_widget, @@ -345,6 +422,15 @@ gtk_layout_set_adjustment_upper (GtkAdjustment *adj, } } +/** + * gtk_layout_set_size: + * @layout: a #GtkLayout + * @width: width of entire scrollable area + * @height: height of entire scrollable area + * + * Sets the size of the scrollable area of the layout. + * + **/ void gtk_layout_set_size (GtkLayout *layout, guint width, @@ -403,6 +489,12 @@ gtk_layout_get_size (GtkLayout *layout, *height = layout->height; } +/** + * gtk_layout_freeze: + * @layout: a #GtkLayout + * + * This is a deprecated function, it doesn't do anything useful. + **/ void gtk_layout_freeze (GtkLayout *layout) { @@ -411,6 +503,12 @@ gtk_layout_freeze (GtkLayout *layout) layout->freeze_count++; } +/** + * gtk_layout_thaw: + * @layout: a #GtkLayout + * + * This is a deprecated function, it doesn't do anything useful. + **/ void gtk_layout_thaw (GtkLayout *layout) { diff --git a/gtk/gtklayout.h b/gtk/gtklayout.h index b216761b1e..68bb43cb3a 100644 --- a/gtk/gtklayout.h +++ b/gtk/gtklayout.h @@ -64,9 +64,11 @@ struct _GtkLayout { GtkAdjustment *hadjustment; GtkAdjustment *vadjustment; - + + /*< public >*/ GdkWindow *bin_window; + /*< private >*/ GdkVisibilityState visibility; gint scroll_x; gint scroll_y; @@ -86,12 +88,12 @@ GtkType gtk_layout_get_type (void) G_GNUC_CONST; GtkWidget* gtk_layout_new (GtkAdjustment *hadjustment, GtkAdjustment *vadjustment); void gtk_layout_put (GtkLayout *layout, - GtkWidget *widget, + GtkWidget *child_widget, gint x, gint y); void gtk_layout_move (GtkLayout *layout, - GtkWidget *widget, + GtkWidget *child_widget, gint x, gint y); diff --git a/gtk/gtktextiter.c b/gtk/gtktextiter.c index ae52c76d17..2d5ecc8b5a 100644 --- a/gtk/gtktextiter.c +++ b/gtk/gtktextiter.c @@ -699,6 +699,17 @@ gtk_text_iter_get_line_index (const GtkTextIter *iter) return real->line_byte_offset; } +/** + * gtk_text_iter_get_visible_line_offset: + * @iter: a #GtkTextIter + * + * Returns the offset in characters from the start of the + * line to the given @iter, not counting characters that + * are invisible due to tags with the "invisible" flag + * toggled on. + * + * Return value: offset in visible characters from the start of the line + **/ gint gtk_text_iter_get_visible_line_offset (const GtkTextIter *iter) { @@ -750,6 +761,18 @@ gtk_text_iter_get_visible_line_offset (const GtkTextIter *iter) return vis_offset; } + +/** + * gtk_text_iter_get_visible_line_index: + * @iter: a #GtkTextIter + * + * Returns the number of bytes from the start of the + * line to the given @iter, not counting bytes that + * are invisible due to tags with the "invisible" flag + * toggled on. + * + * Return value: byte index of @iter with respect to the start of the line + **/ gint gtk_text_iter_get_visible_line_index (const GtkTextIter *iter) { @@ -2499,6 +2522,22 @@ gtk_text_iter_backward_line (GtkTextIter *iter) return TRUE; } + +/** + * gtk_text_iter_forward_lines: + * @iter: a #GtkTextIter + * @count: number of lines to move forward + * + * Moves @count lines forward, if possible (if @count would move + * past the start or end of the buffer, moves to the start or end of + * the buffer). The return value indicates whether the iterator moved + * onto a dereferenceable position; if the iterator didn't move, or + * moved onto the end iterator, then FALSE is returned. If @count is 0, + * the function does nothing and returns FALSE. If @count is negative, + * moves backward by 0 - @count lines. + * + * Return value: whether @iter moved and is dereferenceable + **/ gboolean gtk_text_iter_forward_lines (GtkTextIter *iter, gint count) { @@ -2530,6 +2569,21 @@ gtk_text_iter_forward_lines (GtkTextIter *iter, gint count) } } +/** + * gtk_text_iter_backward_lines: + * @iter: a #GtkTextIter + * @count: number of lines to move backward + * + * Moves @count lines backward, if possible (if @count would move + * past the start or end of the buffer, moves to the start or end of + * the buffer). The return value indicates whether the iterator moved + * onto a dereferenceable position; if the iterator didn't move, or + * moved onto the end iterator, then FALSE is returned. If @count is 0, + * the function does nothing and returns FALSE. If @count is negative, + * moves forward by 0 - @count lines. + * + * Return value: whether @iter moved and is dereferenceable + **/ gboolean gtk_text_iter_backward_lines (GtkTextIter *iter, gint count) { @@ -2838,7 +2892,7 @@ gtk_text_iter_forward_word_end (GtkTextIter *iter) } /** - * gtk_text_iter_forward_word_end: + * gtk_text_iter_backward_word_start: * @iter: a #GtkTextIter * * Moves backward to the next word start. (If @iter is currently on a @@ -3075,7 +3129,9 @@ gtk_text_iter_backward_sentence_start (GtkTextIter *iter) * @iter: a #GtkTextIter * @count: number of sentences to move * - * Calls gtk_text_iter_forward_sentence_end() up to @count times. + * Calls gtk_text_iter_forward_sentence_end() @count times (or until + * gtk_text_iter_forward_sentence_end() returns %FALSE). If @count is + * negative, moves backward instead of forward. * * Return value: %TRUE if @iter moved and is not the end iterator **/ @@ -3105,11 +3161,13 @@ gtk_text_iter_forward_sentence_ends (GtkTextIter *iter, } /** - * gtk_text_iter_forward_sentence_ends: + * gtk_text_iter_backward_sentence_starts: * @iter: a #GtkTextIter * @count: number of sentences to move * - * Calls gtk_text_iter_backward_sentence_start() up to @count times. + * Calls gtk_text_iter_backward_sentence_start() up to @count times, + * or until it returns %FALSE. If @count is negative, moves forward + * instead of backward. * * Return value: %TRUE if @iter moved and is not the end iterator **/ @@ -4935,28 +4993,6 @@ _gtk_text_btree_get_end_iter (GtkTextBTree *tree, check_invariants (iter); } -void -gtk_text_iter_spew (const GtkTextIter *iter, const gchar *desc) -{ - GtkTextRealIter *real = (GtkTextRealIter*)iter; - - g_return_if_fail (iter != NULL); - - if (real->chars_changed_stamp != _gtk_text_btree_get_chars_changed_stamp (real->tree)) - g_print (" %20s: \n", desc); - else - { - check_invariants (iter); - g_print (" %20s: line %d / char %d / line char %d / line byte %d\n", - desc, - gtk_text_iter_get_line (iter), - gtk_text_iter_get_offset (iter), - gtk_text_iter_get_line_offset (iter), - gtk_text_iter_get_line_index (iter)); - check_invariants (iter); - } -} - void _gtk_text_iter_check (const GtkTextIter *iter) { diff --git a/gtk/gtktextiter.h b/gtk/gtktextiter.h index c3ea8516d7..e48ab466e4 100644 --- a/gtk/gtktextiter.h +++ b/gtk/gtktextiter.h @@ -259,10 +259,6 @@ gboolean gtk_text_iter_in_range (const GtkTextIter *iter, void gtk_text_iter_order (GtkTextIter *first, GtkTextIter *second); -/* Debug */ -void gtk_text_iter_spew (const GtkTextIter *iter, - const gchar *desc); - #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/tests/testtextbuffer.c b/tests/testtextbuffer.c index 0bf1a25e18..4ac0dafefc 100644 --- a/tests/testtextbuffer.c +++ b/tests/testtextbuffer.c @@ -6,6 +6,17 @@ #include #include "../gtk/gtktexttypes.h" /* Private header, for UNKNOWN_CHAR */ +static void +gtk_text_iter_spew (const GtkTextIter *iter, const gchar *desc) +{ + g_print (" %20s: line %d / char %d / line char %d / line byte %d\n", + desc, + gtk_text_iter_get_line (iter), + gtk_text_iter_get_offset (iter), + gtk_text_iter_get_line_offset (iter), + gtk_text_iter_get_line_index (iter)); +} + static void fill_buffer (GtkTextBuffer *buffer); static void run_tests (GtkTextBuffer *buffer); -- 2.30.2